package tianrun.ziguan.api.calculate.config.service.datainfo.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import tianrun.ziguan.api.calculate.config.constant.MysqlConstant;
import tianrun.ziguan.api.calculate.config.dao.datainfo.TDatainfoAssetLineMapper;
import tianrun.ziguan.api.calculate.config.entity.datainfo.TDatainfoAssetLine;
import tianrun.ziguan.api.calculate.config.service.datainfo.TDatainfoAssetLineService;
@Service
@DS(MysqlConstant.mysql_MqttToKafka)
public class TDatainfoAssetLineServiceImpl extends ServiceImpl<TDatainfoAssetLineMapper, TDatainfoAssetLine> implements TDatainfoAssetLineService {
    @Override
    public TDatainfoAssetLine getByDeviceNum(String deviceNum) {
        return lambdaQuery().eq(TDatainfoAssetLine::getDeviceNum, deviceNum).last("limit 1").one();
    }
}
